bound and isolate decoder state - #137
Open
harshvardhan-s1 wants to merge 5 commits into
Open
Conversation
… an over-long frame
…ecover after a bad frame
jsbalis1
reviewed
Aug 19, 2026
| /// Matches the limit the `file`, `syslog`, `stdin`, `file_descriptor` and `socket` mode `udp` | ||
| /// sources have always applied, so a frame length that is acceptable to one of those is acceptable | ||
| /// to every delimited framer. | ||
| pub const DEFAULT_MAX_FRAME_LENGTH_BYTES: usize = 100 * 1024; |
Contributor
There was a problem hiding this comment.
Default might cause issues with large packets say cloudtrail reqaqd from aws_s3 as they are a single line and can be larger than 10MB, for Azure I have seen much higher values in highers MB's. Not sure how we cn solve this but just flagging this one
| /// | ||
| /// Panics if called more than once, as the global cap may only be initialized a single time. | ||
| pub fn set_max_frame_length_bytes(size: usize) { | ||
| MAX_FRAME_LENGTH_BYTES |
Contributor
There was a problem hiding this comment.
Should we panic or return error or make the caller take a call on this
| // one peer cannot redefine the template ids another peer's records decode against; | ||
| // without this every connection would inherit the configured decoder's single scope. | ||
| let mut decoder = self.decoder.clone(); | ||
| if let Framer::Netflow(netflow) = &mut decoder.framer { |
Contributor
There was a problem hiding this comment.
This is present for both tcp and udp but missing for say uds, should we reuse it
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.